package cn.edu.zsc.study.repository;

import cn.edu.zsc.study.entity.RoleAuthority;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

public interface RoleAuthoritiesReposity extends BaseMapper<RoleAuthority> {

    @Select("select sra.* from sys_role_authorities as sra left join sys_users_roles sur on sra.role_id = sur.role_id where sur.user_id = #{userId}")
    public Set<RoleAuthority> selectByUserId(Long userId);

}